﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace App.Validate
{
    public class OrCompositeValidatorAttribute : CompositeValidatorAttribute
    {
        public OrCompositeValidatorAttribute(string messageTemplate, string validatorElements)
            : base(messageTemplate, validatorElements)
        {
        }

        public override CompositeValidator CreateCompositeValidator(IEnumerable<Validator> validators)
        {
            Guard.ArgumentNotNull(validators, "validator");
            return new OrCompositeValidator(this.MessageTemplate,validators);
        }
    }
}
